home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / cvsema.z / cvsema
Encoding:
Text File  |  2002-10-03  |  2.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ccccvvvvsssseeeemmmmaaaa((((DDDD3333XXXX))))                                                        ccccvvvvsssseeeemmmmaaaa((((DDDD3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_vvvv_ssss_eeee_mmmm_aaaa - conditionally perform a "V" or signal semaphore operation
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_""""
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_ssss_eeee_mmmm_aaaa_...._hhhh_""""
  14.  
  15.      _iiii_nnnn_tttt _cccc_vvvv_ssss_eeee_mmmm_aaaa_((((_ssss_eeee_mmmm_aaaa______tttt _****_s_e_m_a_p_))))_;;;;
  16.  
  17.    AAAArrrrgggguuuummmmeeeennnnttttssss
  18.      _s_e_m_a_p
  19.           Expects a pointer to the semaphore you want _cccc_vvvv_ssss_eeee_mmmm_aaaa to conditionally
  20.           increment.
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      _cccc_vvvv_ssss_eeee_mmmm_aaaa routine conditionally performs a "V" operation depending on the
  24.      current value of the semaphore. If the semaphore value is strictly less
  25.      than 0, _cccc_vvvv_ssss_eeee_mmmm_aaaa increments the semaphore value by 1 and wakes up a
  26.      sleeping process.  Otherwise, _cccc_vvvv_ssss_eeee_mmmm_aaaa simply returns. _cccc_vvvv_ssss_eeee_mmmm_aaaa effectively
  27.      performs a "V" operation if there is a process asleep on the semaphore;
  28.      otherwise, it does nothing. To initialize semaphores before you use them,
  29.      call _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa(D3X) or _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa______mmmm_uuuu_tttt_eeee_xxxx(D3X).
  30.  
  31.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  32.      _cccc_vvvv_ssss_eeee_mmmm_aaaa returns 1 if the semaphore value is less than 0 and a process is
  33.      awakened. Otherwise _cccc_vvvv_ssss_eeee_mmmm_aaaa returns 0.
  34.  
  35.    SSSSeeeeeeee AAAAllllssssoooo
  36.      _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa(D3X), _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa______mmmm_uuuu_tttt_eeee_xxxx(D3X), _vvvv_ssss_eeee_mmmm_aaaa(D3X)
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.